class Solution:
    def cuttingRope(self, n: int) -> int:
        if n < 4:
            return n - 1
        dp = [0] *( n+1)
        dp[2] = 1
        dp[3] = 2
        print(dp)
        for i in range(4, n + 1):

            dp[i] = max(dp[i - 2] * 2, (i - 2) * 2, dp[i - 3] * 3, (i - 3) * 3)

        return dp[n]


if __name__ == '__main__':
    s = Solution()
    ans = s.cuttingRope(10)
    print(ans)
